home *** CD-ROM | disk | FTP | other *** search
- Path: news01.aud.alcatel.com!usenet
- From: hudssp@aud.alcatel.com (Stanford Hudson)
- Newsgroups: comp.lang.c
- Subject: Re: printf-problem
- Date: 19 Jan 1996 05:17:10 GMT
- Organization: Alcatel Network Systems
- Message-ID: <4dn9gm$adc@news01.aud.alcatel.com>
- References: <4dj4g6$t9f@sunsystem5.informatik.tu-muenchen.de>
- Reply-To: hudssp@aud.alcatel.com
- NNTP-Posting-Host: mosquito.aud.alcatel.com
-
-
- try using:
-
- printf("%ld\n", zahl);
-
- use:
-
- %ld for signed long int
- %lu for unsigned long int
- %d for signed int or signed short
- %u for unsigned int or unsigned short
-
-
- ==>Hi Folks!
- ==>Got a little problem with printing large int's from a c-program.
- ==>Platform: Digital Alpha running DG-UX3.2
- ==>
- ==>Problem:
- ==>..
- ==>..
- ==>..
- ==>
- ==>long int zahl; /* which is e.g. 10000500001 */
- ==>printf("%d\n",zahl); /* gives 1410565409, which is definitly wrong */
- ==>..
- ==>..
- ==>..
- ==>
- ==>Is that a problem of printf() or DG-UX or is it my problem that I don't know
- ==>the right conversion for printf(). Btw, printf("%u",zahl) didn't work either.
- ==>Any suggestions?
- ==>Thanks alot,
- ==>Henrik
- ==>---------------------------------------------------------------------
- ==>"Woher soll ich wissen, was ich denke, bevor |Tel.:+49/89/3089598
- ==>ich nicht gehoert habe, was ich sage?" |smail: Destouchesstr.71
- ==>IRC: |GOOSE| | 80796 Munich
- ==>Systemadministrator am Lehrstuhl A fuer Mechanik| Germany
- ==>---------------------------------------------------------------------
- ==>>>>http://www.lam.mw.tu-muenchen.de/mitarb/wist.html<<<
- ==>
-
-
-
-
-